#pragma once

#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cassert>


struct stack {
	int* a;
	int top;
	int capacity;
};

void stackinit(struct stack*);
void stackpush(struct stack* ok, int x);
void stackpop(struct stack* ok);
bool stackempty(struct stack* ok);

int stacktop(struct stack* ok);
int stacksize(struct stack* ok);